\chapter{CLUBs interpreter instructions}
\label{appendix:readme}
In this appendix, we are going to cover how to use and run the CLUBs interpreter.

First download the project from "aau.zhenntil.net/dat2/clubs.zip"\footnote{In all printed editions of these reports it can also be found on the last page inside a small cd compartment.}.
Extract the files and run \textit{CLUBsInterpreter.exe} in the windows command prompt\footnote{You can try running the interpreter on Linux using mono, but this has not been tested and thus we can't guarantee success.}.
Now the \textit{CLUBsInterpreter.exe} can take a few command line arguments, the most important being a source file, which is a program written in \textit{CLUBs}. There are two small games attached with the interpreter namely connect4 and Tic-Tac-Toe. An example of running Tic-Tac-Toe.
\begin{lstlisting}
CLUBsInterpreter.exe tictactoe.clubs
\end{lstlisting}
This runs Tic-Tac-Toe. If everything goes well you should see the following output.
\begin{lstlisting}
Scanning tictactoe.clubs
Parsing input file
Performing contextual analysis
Starting execution
\end{lstlisting}
When the game is finished it should output.
\begin{lstlisting}
"Some Player" Won!
Game Over. Thank you for playing.
\end{lstlisting}
There are two other optional command line options \textit{-tc} and \textit{-tf}. \textit{-tc} print the abstract syntax tree in the console, and \textit{-tf} prints the abstract syntax tree to a file.
\begin{lstlisting}
//first printing to console
CLUBsInterpreter.exe ttt.clubs -tc

//printing to file
CLUBsInterpreter.exe ttt.clubs -tf myASToutput.txt
\end{lstlisting}

We also included the entire Visual Studio solution so all the source code is available, along with the option of running the interpreter in debug mode, if you want to run your own CLUBs programs in a safe environment.
